package com.javaoopfour;

import com.javaoopthree.Menus;

public class Cart {
    private String name;
    private int num;

    Menus[] menus = new Menus[10];
    public static double status;

    public Cart() {
        System.out.println("无参构造");
    }

    public Cart(String name, int num) {
        this.name = name;
        this.num = num;
    }

    static {
        System.out.println("aaa");
    }
    static {
        System.out.println("bbb");
    }
    static {
        System.out.println("ccc");
    }

    public static void eat(){
       // this.name=10;
       /* ;
        getName();*/
        eat();
        status=100;
        System.out.println();
    }

    public String getName() {
        eat();
        status=10;
        getName();
        this.name="";
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
